<template>
  <div>
    <h1>Not Found <span>{{ time }}秒后跳转到首页...</span></h1>
  </div>
</template>

<script>
export default {
  data () {
    return {
      time: 3
    }
  },
  created () {
    setInterval(() => {
      if (this.time === 0) {
        this.$router.push('/home')
      }
      this.time--
    }, 1000)
  }
}
</script>

<style scoped lang='less'>
  h1 {
    font-size: 50px;
    text-align: center;
  }
  span {
    font-size: 18px;
    color: #666;
  }
</style>
